﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SvnNotes
{
    public class DefaultOutputTransformer : IOutputTransformer
    {
        public Dictionary<string, EntryCollection> Entries { get; set; }

        public object Transform()
        {
            StringBuilder output = new StringBuilder();
            foreach (string key in Entries.Keys)
            {
                output.AppendLine(key);
                output.AppendLine();
                foreach (Entry entry in Entries[key])
                {
                    output.AppendFormat("\t- {0}{1}\n", entry.Id, entry.Note);
                }
                output.AppendLine();
            }

            return output.ToString();
        }

        public string[] Args { get; set;}

    }
}
